/**
 *  author: wangcheng
 * date: 2018/08/17
 * des: 待我审批
 */
import request from '@/utils/request'

/**
 *  private int countConrrection;//转正(1)
    private int countTurnover;//调动(2、3)
    private int countLeave;//离职(5、7)
    private int countDelay;//试用延期(4)
 */
export function findStatusCount(status) {
  return request({
    url: '/salaryverifys/findStatusCount',
    method: 'get',
    params: {
      status: status
    }
  })
}


/**
 * 入职
 */
export function getEntryList(params) {
  return request({
    url: '/salaryverifys/findEntryIng',
    method: 'get',
    params: params
  })
}

/**
 * 延期列表
 */
export function getDealDelayList(params) {
  return request({
    url: '/salaryverifys/findDelayIng',
    method: 'get',
    params: params
  })
}

/**
 * 年度
 */
export function getYearIngList(params) {
  return request({
    url: '/salaryverifys/findYearIng',
    method: 'get',
    params: params
  })
}
/**
 * 转正列表
 */
export function getConrrectionList(params) {
  return request({
    url: '/salaryverifys/findConrrectionIng',
    method: 'get',
    params: params
  })
}

/**
 * 调动列表
 */
export function getTurnoverList(params) {
  return request({
    url: '/salaryverifys/findTurnoverIng',
    method: 'get',
    params: params
  })
}

/**
 * 离职列表
 */
export function getLeaveList(params) {
  return request({
    url: '/salaryverifys/findLeaveIng',
    method: 'get',
    params: params
  })
}



/**
 * 入职详情
 */
export function findEntryDetail(params) {
  return request({
    url: '/salaryverifys/findEntryDetail',
    method: 'get',
    params: params
  })
}


/**
 * 年度详情
 */
export function findYearDetail(params) {
  return request({
    url: '/salaryverifys/findYearDetail',
    method: 'get',
    params: params
  })
}


/**
 * 延期详情
 */
export function findDelayDetail(params) {
  return request({
    url: '/salaryverifys/findDelayDetail',
    method: 'get',
    params: params
  })
}
/**
 * 转正详情
 */
export function findConrrectDetail(params) {
  return request({
    url: '/salaryverifys/findConrrectDetail',
    method: 'get',
    params: params
  })
}
/**
 * 调动详情
 */
export function findTurnoverDetail(params) {
  return request({
    url: '/salaryverifys/findTurnoverDetail',
    method: 'get',
    params: params
  })
}
/**
 * 离职详情
 */
export function findLeaveDetail(params) {
  return request({
    url: '/salaryverifys/findLeaveDetail',
    method: 'get',
    params: params
  })
}



/**
 * 入职通过
 */
export function dealEntryApprove(params) {
  return request({
    url: '/salaryverifys/dealEntry',
    method: 'post',
    data: params
  })
}

/**
 * 延期通过
 */
export function dealDelayApprove(params) {
  return request({
    url: '/salaryverifys/dealDelay',
    method: 'get',
    params: params
  })
}

/**
 * 转正通过
 */
export function dealConrrectionApprove(params) {
  return request({
    url: '/salaryverifys/dealConrrection',
    method: 'get',
    params: params
  })
}


/**
 * 调动通过
 */
export function dealTurnoverApprove(params) {
  return request({
    url: '/salaryverifys/dealTurnover',
    method: 'get',
    params: params
  })
}

/**
 * 离职通过
 */
export function dealLeaveApprove(params) {
  return request({
    url: '/salaryverifys/dealLeave',
    method: 'get',
    params: params
  })
}

/**
 * 年度通过
 */
export function dealYearApprove(params) {
  return request({
    url: '/salaryverifys/dealYear',
    method: 'get',
    params: params
  })
}







/**
 * 详情
 */
export function getReqdetail(id) {
  return request({
    url: '/recruitreqs/find/' + id,
    method: 'get'

  })
}

/**
 * 新增需求
 */
export function addRequire(data) {
  return request({
    url: '/recruitreqs/insert',
    method: 'post',
    data
  })
}
/**
 * 高级搜索
 */
export function searchRequire(data) {
  // console.log(data);
  return request({
    url: '/hr/recruit/require/searchReq/mock',
    method: 'get',
    data
  })
}
/**
 * 编辑需求
 */
export function editRequire(data) {
  return request({
    url: '/recruitreqs/update',
    method: 'put',
    data
  })
}

/**
 * 停止招聘
 */
export function stopRequire(data) {
  return request({
    url: 'recruitreqs/stopRecruits',
    method: 'put',
    data
  })
}

/**
 * 删除需求
 */
export function deleteReq(reqId) {
  return request({
    url: '/recruitreqs/delete/' + reqId,
    method: 'delete'

  })
}


/**
 * 放弃申请
 */
export function giveupReq(data) {
  return request({
    url: '/recruitreqs/giveup',
    method: 'delete',
    params: data
  })
}


/**
 * 重新提交
 */
export function updateSubmit(data) {
  return request({
    url: '/recruitreqs/updateBack',
    method: 'put',
    data: data
  })
}
